function findSubStr(string,subString){
    let subLength = subString.length;
    for(let i = 0; i < string.length; ++i){
        let right = i + subLength;
        if(right > string.length){
            right = string.length;
        }
        //console.log(string.substring(i,right))
        if(subString === string.substring(i,right)){
            return true;
        }
    }
    return false;
}

console.log(findSubStr("fuckfjdfneadkfabcdeflakdjflakabcdefj","abcdefj"))